Robotics 1.0 Lesson Plan
Lesson 1: Hello Circuit Python.

Purpose: Students will learn basic Python concepts like variables and conditional statements and use the MU Editor to program the Circuit Playground Express via UF2 firmware.

No. of. Classes

1 - (Time : 1 Hour 30 minutes, Each group has a maximum of 2 children).

Materials Required
  • Computer with Python installed

  • Mu Editor (recommended) or any code editor

Prior knowledge

Basic computer operation knowledge.

Exercises

Exercise:1



Setting up the CPX for Circuit Python


  • Install the MU Editor(You can use any Editor like Visual studio,Notepad++,etc But Mu Editor is the recommended one)

    Click here to download and install the MU Editor.


  • Download latest firmware for CPX and install in board

    Click here to download the UF2 package.


  • Exercise:2



  • Print Statement


    Here are the instructions for the how to do that.

  • Exercise:3



    Introduction of Variables in python


    Variables are used to store information. You can store text, numbers, or even results of calculations.


  • String Variables


    Follow these instructions to learn how to create and use string variables in Python.

  • Integer and Float Variables


    Numbers in Python can be stored as integers (whole numbers) or floats (numbers with decimals). Learn how to create both types and perform calculations with them.


    Follow these instructions to practice working with numeric variables.

  • Updating a Variable


    Variables can be changed as your program runs. In this activity, you’ll learn how to update the value stored in a variable and see how it affects your output.


    Follow these steps to experiment with updating variables in Python.

  • Teacher's Instruction
    1. Introduce Python syntax using examples on the board.
    2. Can variables be given any name? Ask the students to find out the rules on naming variables. Ask them to name a variable as 'continue' and see what happens in code
    3. Explain indentation rules in Python.
    4. Ask the students why they think indentation matters in Python whereas in html/css or javascript, it doesn't matter.
    5. Guide students to write and run each exercise in Mu Editor or another editor.
    6. Ask students to modify code samples to test understanding.
    7. Encourage sharing and discussion of results.
    8. x = 5
      y = 2.5
      z = "Hello"
      print(x + y)
      print(z + x)
      Ask students to run this code and observe what happens. Discuss the output - datatype of x+y, is z+x possible?